let formValidate = {
  data(){
    let passwordValidator = (rule,value,callback) => {
      if(value.length<6){
        return callback(new Error('密码长度不能少于6位'))
      }
      callback()
    }
    let confirmValidator = (rule,value,callback) => {
      if(value.length<6){
        return callback(new Error('密码长度不能少于6位'))
      } else if(value!==this._data.formInline.password){
        return callback(new Error('两次输入密码不一致!'))
      }
      callback()
    }
    return {
      ruleForm:{
        password:[{ required:true, validator:passwordValidator, trigger:'blur'}],
        passwordConfirm:[{ required:true, validator:confirmValidator, trigger:'blur' }]
      }
    }
  }
}
export { formValidate }